<template>
  <!-- 主内容布局 -->
  <div class="dashboard-layout">
    <!-- 左侧：用户信息卡片 -->
    <div class="dashboard-left">
      <div class="profile-card">
        <div class="profile-header">
          <div class="big-avatar">
            <img src="/picture/管理员.png" alt="用户头像" class="avatar-image" />
          </div>
          <div class="profile-text">
            <div class="name">冰酱</div>
            <div class="role">高级测试开发工程师</div>
          </div>
        </div>
        <div class="profile-details">
          <div class="profile-info-item">
            <div class="info-icon">
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                <path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" />
                <polyline points="22,6 12,13 2,6" />
              </svg>
            </div>
            <div class="info-text">test@company.com</div>
          </div>
          <div class="profile-info-item">
            <div class="info-icon">
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                <rect x="3" y="4" width="18" height="18" rx="2" ry="2" />
                <line x1="16" y1="2" x2="16" y2="6" />
                <line x1="8" y1="2" x2="8" y2="6" />
                <line x1="3" y1="10" x2="21" y2="10" />
                <path d="M8 14h.01" />
                <path d="M12 14h.01" />
                <path d="M16 14h.01" />
                <path d="M8 18h.01" />
                <path d="M12 18h.01" />
                <path d="M16 18h.01" />
              </svg>
            </div>
            <div class="info-text">ID: 001</div>
          </div>
          <div class="profile-info-item">
            <div class="info-icon">
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                <rect x="3" y="4" width="18" height="18" rx="2" ry="2" />
                <line x1="16" y1="2" x2="16" y2="6" />
                <line x1="8" y1="2" x2="8" y2="6" />
                <line x1="3" y1="10" x2="21" y2="10" />
              </svg>
            </div>
            <div class="info-text">加入时间: 2023-01-15</div>
          </div>
        </div>
        <div class="profile-stats">
          <div class="profile-stat-item">
            <div class="stat-value">12</div>
            <div class="stat-label">活跃项目</div>
          </div>
          <div class="profile-stat-item">
            <div class="stat-value">156</div>
            <div class="stat-label">本月执行</div>
          </div>
          <div class="profile-stat-item">
            <div class="stat-value">89%</div>
            <div class="stat-label">通过率</div>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 右侧：测试案例统计卡片 -->
    <div class="dashboard-right">
      <!-- 卡片网格 - 重构为统一高度和间距 -->
      <div class="stats-cards grid-uniform">
        <!-- UI自动化案例统计 -->
        <div class="stat-card ui-automation">
          <div class="stat-card-header">
            <div class="stat-icon">
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                <rect x="2" y="3" width="20" height="14" rx="2" ry="2" />
                <line x1="8" y1="21" x2="16" y2="21" />
                <line x1="12" y1="17" x2="12" y2="21" />
              </svg>
            </div>
            <h3 class="stat-title">UI自动化案例</h3>
          </div>
          <div class="stat-card-body">
            <div class="stat-number">156</div>
            <div class="stat-progress">
              <div class="progress-bar">
                <div class="progress-fill" style="width: 75%;"></div>
              </div>
              <div class="progress-text">75% 完成率</div>
            </div>
          </div>
          <div class="stat-card-footer">
            <div class="stat-trend positive">
              <span class="trend-icon">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="trend-svg">
                  <polyline points="23 6 13.5 15.5 8.5 10.5 1 18" />
                  <polyline points="17 6 23 6 23 12" />
                </svg>
              </span>
              <span class="trend-value">较上周新增 8条</span>
            </div>
          </div>
        </div>
        
        <!-- 接口自动化案例统计 -->
        <div class="stat-card api-automation">
          <div class="stat-card-header">
            <div class="stat-icon">
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                <path d="M6 3v12" />
                <circle cx="18" cy="6" r="3" />
                <circle cx="6" cy="18" r="3" />
                <path d="M18 9a9 9 0 0 1-9 9" />
              </svg>
            </div>
            <h3 class="stat-title">接口自动化案例</h3>
          </div>
          <div class="stat-card-body">
            <div class="stat-number">89</div>
            <div class="stat-progress">
              <div class="progress-bar">
                <div class="progress-fill" style="width: 60%;"></div>
              </div>
              <div class="progress-text">60% 完成率</div>
            </div>
          </div>
          <div class="stat-card-footer">
            <div class="stat-trend positive">
              <span class="trend-icon">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="trend-svg">
                  <polyline points="23 6 13.5 15.5 8.5 10.5 1 18" />
                  <polyline points="17 6 23 6 23 12" />
                </svg>
              </span>
              <span class="trend-value">较上周新增 5条</span>
            </div>
          </div>
        </div>
        
        <!-- AI生成测试案例统计 -->
        <div class="stat-card ai-generated">
          <div class="stat-card-header">
            <div class="stat-icon">
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                <rect x="3" y="11" width="18" height="10" rx="2" />
                <circle cx="12" cy="5" r="2" />
                <path d="M12 7v4" />
                <line x1="8" y1="16" x2="8" y2="16" />
                <line x1="16" y1="16" x2="16" y2="16" />
              </svg>
            </div>
            <h3 class="stat-title">AI生成测试案例</h3>
          </div>
          <div class="stat-card-body">
            <div class="stat-number">42</div>
            <div class="stat-progress">
              <div class="progress-bar">
                <div class="progress-fill" style="width: 45%;"></div>
              </div>
              <div class="progress-text">45% 完成率</div>
            </div>
          </div>
          <div class="stat-card-footer">
            <div class="stat-trend positive">
              <span class="trend-icon">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="trend-svg">
                  <polyline points="23 6 13.5 15.5 8.5 10.5 1 18" />
                  <polyline points="17 6 23 6 23 12" />
                </svg>
              </span>
              <span class="trend-value">较上周新增 3条</span>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 测试分析报告 -->
      <div class="analysis-section">
        <div class="analysis-header">
          <div class="analysis-title-area">
            <div class="analysis-icon coverage-icon">
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                <circle cx="12" cy="12" r="10" />
                <polyline points="12 6 12 12 16 14" />
              </svg>
            </div>
            <div>
              <div class="analysis-title">测试覆盖率分析</div>
            </div>
          </div>
          <div class="analysis-percent">
            78<span class="percent-sign">%</span>
          </div>
        </div>
        
        <div class="analysis-body">
          <div class="donut-container">
            <svg width="160" height="160" class="donut-chart">
              <circle cx="80" cy="80" r="70" fill="none" stroke="#e2e8f0" stroke-width="12" />
              <circle cx="80" cy="80" r="70" fill="none" stroke="#4361ee" stroke-width="12" stroke-dasharray="329.8672286269283" stroke-dashoffset="72.57079029812423" />
              <text x="80" y="75" text-anchor="middle" class="donut-center-text">78%</text>
              <text x="80" y="95" text-anchor="middle" class="donut-center-subtext">覆盖率</text>
            </svg>
          </div>
          
          <div class="analysis-details">
            <div class="detail-item">
              <span>UI测试覆盖率</span>
              <span>85%</span>
            </div>
            <div class="detail-item">
              <span>接口测试覆盖率</span>
              <span>72%</span>
            </div>
            <div class="detail-item">
              <span>性能测试覆盖率</span>
              <span>65%</span>
            </div>
            <div class="detail-item">
              <span>安全测试覆盖率</span>
              <span>58%</span>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 测试数据汇总表 -->
      <SummaryTable />
      
      <!-- 当前任务执行状态卡片 -->
      <div class="current-tasks-section">
        <div class="section-header">
          <h3 class="section-title">当前任务执行状态</h3>
          <button class="view-all-btn">查看全部</button>
        </div>
        <div class="tasks-grid">
          <div class="task-card running">
            <div class="task-header">
              <div class="task-title">API自动化测试套件</div>
              <div class="task-status">运行中</div>
            </div>
            <div class="task-progress">
              <div class="progress-bar">
                <div class="progress-fill" style="width: 65%;"></div>
              </div>
              <div class="progress-text">65% 完成</div>
            </div>
            <div class="task-details">
              <div class="task-detail-item">
                <span class="detail-label">持续时间</span>
                <span class="detail-value">01:23:45</span>
              </div>
              <div class="task-detail-item">
                <span class="detail-label">已执行</span>
                <span class="detail-value">128/200</span>
              </div>
            </div>
          </div>
          
          <div class="task-card queued">
            <div class="task-header">
              <div class="task-title">UI回归测试</div>
              <div class="task-status">等待中</div>
            </div>
            <div class="task-queue-info">
              <div class="queue-position">队列位置: 1</div>
              <div class="estimated-time">预计开始: 5分钟后</div>
            </div>
            <div class="task-details">
              <div class="task-detail-item">
                <span class="detail-label">测试用例</span>
                <span class="detail-value">85个</span>
              </div>
              <div class="task-detail-item">
                <span class="detail-label">优先级</span>
                <span class="detail-value">高</span>
              </div>
            </div>
          </div>
          
          <div class="task-card completed">
            <div class="task-header">
              <div class="task-title">性能测试报告</div>
              <div class="task-status">已完成</div>
            </div>
            <div class="task-result">
              <div class="result-status success">通过</div>
              <div class="completion-time">完成于: 10分钟前</div>
            </div>
            <div class="task-details">
              <div class="task-detail-item">
                <span class="detail-label">响应时间</span>
                <span class="detail-value">平均 235ms</span>
              </div>
              <div class="task-detail-item">
                <span class="detail-label">成功率</span>
                <span class="detail-value">98.5%</span>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import TestStatsSection from '../components/TestStatsSection.vue'
import SummaryTable from '../components/SummaryTable.vue'
import ApiCoverageChart from '../components/ApiCoverageChart.vue'
import CircularChart from '../components/CircularChart.vue'

export default {
  name: 'DashboardContent',
  components: {
    TestStatsSection,
    SummaryTable,
    ApiCoverageChart,
    CircularChart
  }
}
</script>

<style scoped>
/* 主内容布局 */
.dashboard-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  margin-bottom: 40px;
  width: 100%;
}

/* 左侧布局 */
.dashboard-left {
  display: flex;
  flex-direction: column;
}

/* 右侧布局 */
.dashboard-right {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* 用户信息卡片样式 */
.profile-card {
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
  width: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  height: 100%;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-image: linear-gradient(135deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(67, 97, 238, 0.15) 50%,
    rgba(58, 86, 212, 0.25) 100%);
  transition: all 0.3s ease;
}

.profile-card:hover {
  box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25);
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.3);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(241, 245, 249, 0.5);
  position: relative;
  z-index: 2;
}

.big-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(67, 97, 238, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 24px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: #4361ee;
  box-shadow: 0 8px 20px rgba(67, 97, 238, 0.25);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.avatar-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-text {
  position: relative;
  z-index: 2;
}

.profile-text .name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #1e293b;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  position: relative;
}

.profile-text .name::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, #4361ee, transparent);
  border-radius: 2px;
}

.profile-text .role {
  opacity: 0.9;
  font-size: 14px;
  color: #4361ee;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.profile-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s ease;
}

.profile-info-item:hover {
  transform: translateX(5px);
}

.info-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.info-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.5px;
  color: #4361ee;
}

.info-text {
  font-size: 14px;
  color: #1e293b;
  font-weight: 500;
}

.profile-stats {
  display: flex;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(241, 245, 249, 0.5);
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.2);
  margin: auto -24px -24px -24px;
  padding: 16px 24px;
  border-radius: 0 0 12px 12px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.profile-stat-item {
  text-align: center;
  flex: 1;
  transition: transform 0.2s ease;
  padding: 0 8px;
}

/* 调整重要统计项到右侧 */
.profile-stat-item.main-stats {
  flex: 0 0 auto;
  background: rgba(67, 97, 238, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  margin-left: 8px;
  box-shadow: 0 2px 8px rgba(67, 97, 238, 0.15);
}

.profile-stat-item:hover {
  transform: translateY(-3px);
}

.profile-stat-item:not(:last-child) {
  border-right: none;
}

/* 统计卡片样式 */
.stat-number {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: #1e293b;
  font-weight: 500;
  opacity: 0.8;
}

/* 统一网格样式 - 提高视觉协调性 */
.stats-cards.grid-uniform {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 160px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 1;
}

.ui-automation::before { background: #4361ee; }
.api-automation::before { background: #f59e0b; }
.ai-generated::before { background: #10b981; }

.stat-card-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.5px;
}

.ui-automation .stat-icon { background: rgba(67, 97, 238, 0.1); color: #4361ee; }
.api-automation .stat-icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.ai-generated .stat-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; }

.stat-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.stat-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
  justify-content: center;
}

.ui-automation .stat-number { color: #4361ee; }
.api-automation .stat-number { color: #f59e0b; }
.ai-generated .stat-number { color: #10b981; }

.stat-progress {
  margin-top: auto;
  text-align: center;
}

.progress-bar {
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
}

.ui-automation .progress-fill { background: #4361ee; }
.api-automation .progress-fill { background: #f59e0b; }
.ai-generated .progress-fill { background: #10b981; }

.progress-text {
  font-size: 16px;
  color: #64748b;
  text-align: center;
  font-weight: 500;
}

.stat-card-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  gap: 8px;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 14px;
}

.stat-trend.positive {
  color: #10b981;
  font-weight: 500;
}

.trend-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.trend-svg {
  width: 14px;
  height: 14px;
}

/* 测试覆盖率分析样式 */
.analysis-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  margin-bottom: 32px;
}

.analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.analysis-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.analysis-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(67, 97, 238, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4361ee;
}

.analysis-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.5px;
}

.analysis-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.analysis-percent {
  font-size: 32px;
  font-weight: 700;
  color: #4361ee;
  display: flex;
  align-items: baseline;
}

.percent-sign {
  font-size: 20px;
  font-weight: 600;
  margin-left: 4px;
}

.analysis-body {
  display: flex;
  align-items: center;
  gap: 40px;
}

.donut-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-chart {
  transform: rotate(-90deg);
}

.donut-center-text {
  font-size: 28px;
  font-weight: 700;
  color: #4361ee;
  transform: rotate(90deg);
}

.donut-center-subtext {
  font-size: 14px;
  color: #64748b;
  transform: rotate(90deg);
}

.analysis-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}

.detail-item span:first-child {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.detail-item span:last-child {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

/* 测试覆盖率分析样式 */
.api-analysis-section {
  margin-bottom: 32px;
}

.api-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.api-stats-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.api-stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stats-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 20px;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stat-item {
  text-align: center;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #f3f4f6;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
  font-weight: 500;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.stat-value.total { color: #374151; }
.stat-value.tested { color: #3b82f6; }
.stat-value.passed { color: #10b981; }
.stat-value.failed { color: #ef4444; }
.stat-value.response { color: #8b5cf6; }
.stat-value.error { color: #f59e0b; }

/* 响应式设计 */
@media (max-width: 1200px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  
  .api-charts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .analysis-body {
    flex-direction: column;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  
  .stats-cards.grid-uniform {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .stat-item {
    padding: 8px;
  }
  
  .stat-value {
    font-size: 16px;
  }
  
  .analysis-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .task-details {
    grid-template-columns: 1fr;
  }
}
</style>